﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Entities;
using TMPro;

public class GameOverPanel : MonoBehaviour {
    [SerializeField] TextMeshProUGUI contentText;

    private RectTransform rectTrans;

    private void Awake() {
        rectTrans = GetComponent<RectTransform>();
    }

    public void SetSocre(int score_) {
        contentText.text = $"Your score is {score_}.";    
    }
    public void OnRetryBtnClicked() {
        SingleGameCenter.Instance.Retry();
        WindowManager.Instance.CloseGameOverPanel();
    }
    public void OnBackBtnClicked() {
        SingleGameCenter.Instance.BackToStartMenu();
        WindowManager.Instance.CloseGameOverPanel();
    }

    public void SetPos(Vector3 pos_) {
        rectTrans.anchoredPosition = pos_;
    }
}
